#ifndef EASYGEOJSON_LIBRARY_H
#define EASYGEOJSON_LIBRARY_H

#include <iostream>
#include <vector>
#include <map>

struct Coordinate {
    double x, y, z;
};

enum Type {
    Point, Line, Polygon
};

struct Feature {
    std::vector<Coordinate> geometry;
    std::map<std::string,std::string> properties;
};

class EasyGeoJSON {
private:
    Type type;
    std::vector<Feature> features;
    std::map<std::string ,std::string> properties;
    std::string filePath;

public:
    explicit EasyGeoJSON(Type,const std::string&);

    void addFeature(const Feature &feature);

    void addProperties(const std::string& key,const std::string& value);

    void getGeoJSON(std::string &geojson);

    void write();
};

#endif //EASYGEOJSON_LIBRARY_H
